package com.mlz.mlzmall.ui.activity.act.personal;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.mlz.mlzmall.R;
import com.mlz.mlzmall.ui.activity.act.base.BaseActivity;
import com.mlz.mlzmall.ui.activity.act.main.MainActivity;
import com.mlz.mlzmall.ui.utils.util.AppManager;

/**
 * describe :
 * Created by Pm on 2016/6/1.
 * PackageName com.mlz.mlzmall.ui.activity.act.personal.
 * ProjectName mlzmall_android.
 */

public class IntegralPaySuccessActivity extends BaseActivity{
    private Button btn_home_page;
    private Button btn_center_integration;
    Intent intent;
    int type;
    String content;
    private RelativeLayout iv_back_exchange_ok_had;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_integral_pay_success);
        iv_back_exchange_ok_had = (RelativeLayout) findViewById(R.id.iv_back_exchange_ok_had);
        btn_home_page = (Button) findViewById(R.id.btn_home_page);//点击到首页特的按钮
        btn_center_integration = (Button) findViewById(R.id.btn_center_integration);//点击跳转到积分中心的按钮
        iv_back_exchange_ok_had.setOnClickListener(this);
        btn_home_page.setOnClickListener(this);
        btn_center_integration.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId())
        {
            case R.id.iv_back_exchange_ok_had:
                finish();
                break;
            case R.id.btn_center_integration:
           //   AppManager.getAppManager().finishActivity(ConfirmExchangeActivity.class);
                AppManager.getAppManager().finishActivity(ReceiveAddress.class);
                AppManager.getAppManager().finishActivity(IntergationRedemptionActivity.class);
                AppManager.getAppManager().finishActivity(IntegralActivity.class);

                Intent intent1 = new Intent();
                intent1.setClass(IntegralPaySuccessActivity.this, IntegralActivity.class);
                startActivity(intent1);
                finish();
                break;
            case R.id.btn_home_page:
                Intent intent2 = new Intent();
                intent2.setClass(IntegralPaySuccessActivity.this, MainActivity.class);
                startActivity(intent2);
                finish();
                break;
            default:
                break;
        }
    }
}
